/**
 * https://ac.nowcoder.com/acm/problem/21472
 */

#include<iostream>
using namespace std;
typedef long long ll;
ll sum()
int main()
{
   vector<int> v;
    ll a[1e6+4][2]={0};
    ll n;
    cin>>n;
    for(int i=0;i<n;++i){
        int k;
        cin>>k;
        v.push_back(k);
    }
    
}